package com.plian.system.dto.zzd;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;

/**
 * @Description: TODO
 * @Author: Take-off
 * @Date: 2023/3/15 9:54 AM
 * @Param
 * @return
 * @Version: 1.0
 **/
@Data
@ApiModel(value = "ZZDQuery",description = "浙政钉查询query")
public class ZZDQuery implements Serializable {
    private static final long serialVersionUID = 1L;

    @Pattern(regexp = "^\\d{4}-((0([1-9]))|(1(0|1|2)))$", message = "统计日期格式错误", groups = ZZDQuery.QueryGroup.class)
    @ApiModelProperty("统计日期 2020-01 默认当前时间")
    private String reportTime;

    @Max(value = 2, message = "企业类型错误", groups = ZZDQuery.QueryGroup.class)
    @Min(value = 1, message = "企业类型错误", groups = ZZDQuery.QueryGroup.class)
    @NotNull(message = "企业类型为空", groups = ZZDQuery.QueryGroup.class)
    @ApiModelProperty("企业类型：1-全大市；2-监管企业")
    private Integer orgType;

    @NotBlank(message = "组织名称为空", groups = ZZDQuery.KeywordGroup.class)
    @ApiModelProperty("关键字")
    private String keyword;

    public interface QueryGroup {
    }

    public interface KeywordGroup{
    }
}
